<template>
  <u-popup 
    :show="show" 
    mode="center" 
    @close="handleClose" 
    bgColor="transparent" 
    :closeable="true"
  >
    <view class="linear-primary-gradient rd-16 p-20 w-85vw">
      <view v-if="title" class="color-info-3 mb-10 py-10 text-shadow fs-36 fw-600 mr-46">{{ title }}</view>
      <view class="bg-fff-7 rd-16 p-20 py-30 lh-40 fs-26" style="min-height: 45vh;">
        <u-parse :content="content"></u-parse>
      </view>
    </view>
  </u-popup>
</template>

<script>
export default {
  name: 'Popup',
  data() {
    return {};
  },
  props: {
    show: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    },
    content: {
      type: String,
      default: ''
    }
  },
  methods: {
    handleClose() {
      // 同时触发一个close事件，方便父组件做额外处理
      this.$emit('close');
    }
  }
};
</script>

<style lang="scss">
/* 可以添加一些弹窗的基础样式 */
</style>